<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="lib/echarts.min.js"></script>
</head>
<body>
  <div style="width: 600px;height: 400px"></div>
  <script>
    var mCharts = echarts.init(document.querySelector('div'))
    var option = {
      title: {
        text: '饼图样式测试',
        textStyle: { // 控制标题的文字样式
          color: 'blue'
        }
      },
      series: [
        {
          type: 'pie',
          data: [
            { 
              name: '淘宝',
              value: '13431',
              itemStyle: { // 控制淘宝这一块区域的样式
                color: 'green'
              },
              label: {
                color: 'skyblue'
              },
              emphasis: {
                itemStyle: { // 控制淘宝这一块区域的样式
                  color: 'blue'
                },
                label: {
                  color: 'black'
                },
              }
            },
            { name: '天猫', value: '6589' },
            { name: '京东', value: '26989' },
            { name: '唯品会', value: '5469' },
            { name: '小红书', value: '10697' },
          ]
        }
      ]
    }
    mCharts.setOption(option)
  </script>
</body>
</html>